srchr/models/history

  • constructor
inherits: can.Model

Provides a History model that allows data to be saved and retrieved from localStorage. Example:

// Create a new item
var history = new History({query: "cats", types: ["big"]});
// save it
history.save();

// change a property and save it back
history.attr("types").push("lolz")
history.save()

// destroy it
history.destroy()


// get all items from localStorage
History.findAll({}, function(items){

})